<?php
/**
 * Created by PhpStorm.
 * User: Antique
 * Date: 2021/12/15
 * Time: 下午 11:30
 */
include_once '../tools/common.php';
include_once '../tools/DbTools.php';
$is_login = getLoginStatus();
if (!$is_login) {
    echo '尚未登入，<a href="../user/loginUi.php">请登入</a>';
    die;
} else {
    $CardNo=$_POST['CardNo'];
    session_start();
    DbTools::InitDb();
    $sql="delete from bankcard where CardNo='".$CardNo."'";
    $flag= DbTools::noSelect($sql);
};

?>

<!DOCTYPE html>

<html>
	
	<script>
		if(<?php echo $flag?>){
			alert('成功！');
			location.href='../user/userInfo.php';
		}
	</script>
</html>
